package com.longtop.sp.mapdao;

/**
 * 工厂方法接口，使用AbstractFactory设计模式，类图如下：
 * <pre>
 *               DatabaseFactoryInterface
 *                          |
 *                    AbstractFactory
 *                /         |         \
 *      OracleFactory   MssqlFactory   SybaseFactory
 * </pre>
 * @version $Revision: 1.1 $
 */

import java.sql.SQLException;
import java.util.Map;

import org.springframework.jdbc.core.JdbcTemplate;

import com.longtop.sp.mapdao.meta.IPrimaryKey;

public interface DatabaseFactoryInterface {

	public Insert createInsert(String tableName, Map rowData);

	public Insert createInsert(JdbcTemplate jt, String tableName, Map rowData);

	public Update createUpdate(String tableName, Map rowData);

	public Update createUpdate(JdbcTemplate jt, String tableName, Map rowData);

	public Operate createOperate(JdbcTemplate jt, String tableName, Map rowData);

	public Operate createOperate(String tableName, Map rowData);

	public Lob createLob();

	public IPrimaryKey createPrimary(String tableName) throws SQLException;

	public IPrimaryKey createPrimary(JdbcTemplate jt, String tableName)
			throws SQLException;
}